package com.gcxy.controller;


import com.gcxy.core.R;
import com.gcxy.dto.clazz.GetClazzListDTO;
import com.gcxy.service.ClazzService;
import com.gcxy.vo.clazz.ClazzVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 班级 前端控制器
 * </p>
 *
 * @author Huang先森
 * @since 2024-07-22
 */
@RestController
@RequestMapping("/clazz")
@Api(tags = "班级管理")
public class ClazzController {

    @Autowired
    private ClazzService clazzService;

    /**
     * 根据组织机构ID和学期ID查询班级列表
     */
    @GetMapping("/getClazzListByCondition")
    @ApiOperation("根据组织机构ID和学期ID查询班级列表")
    public R<List<ClazzVO>> getClazzListByCondition(@Validated GetClazzListDTO getClazzListDTO) {
        return R.Success(clazzService.getClazzListByCondition(getClazzListDTO));
    }

}

